package com.dd.cloud.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dd.cloud.auth.entity.RoleToMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zk
 */
public interface RoleToMenuMapper extends BaseMapper<RoleToMenu> {
    /**
     * 批量添加角色的菜单权限
     *
     * @param roleId
     * @param menus
     * @return
     */
    int addBatchRoleToMenu(@Param("roleId") Integer roleId, @Param("menus") List<Integer> menus);

    /**
     * 查询角色菜单id
     *
     * @param roleId
     * @return
     */
    List<Integer> getRoleMenuIdsByRoleId(@Param("roleId") Integer roleId);
}
